# Crosswalks

This folder includes scripts that generate crosswalks.

## Geographic Crosswalks

| Script | Description |
|:---------|:---------|
| `cw_geo_czone.do` | Script that improves on the raw county FIPS-commuting zone crosswalk from David Dorn. |
| `cw_geo_msa.do` | Script that exports 1) MSA codes-MSA names, and 2) county FIPS-MSA. |
| `cw_state_abb.R` | Script that produces a list of US states and their abbreviations and MSA codes (for the "residual state"). |
| `cw_geo_msa_czone.do` | Script that produces a hybrid version of MSA and CZONE codes, where 1) we assign to the counties in real MSA their MSA codes, and 2) we assign to countries outside of real MSA their CZONE code + 100000. |
| ` ` | |

## Industry Classifications

| Script | Description |
|:---------|:---------|
| `cw_ind_1_jsung.do` | Script that imports Jihoon's crosswalks. |
| `cw_ind_1_jsung_fix.do` | Some manual fix for Jihoon's crosswalks. |
| `cw_ind_fk_1_raw.do` | Script that imports raw fk_naics codes. |
| `cw_ind_fk_2_comp.do` | Script that compares different versions of fk_naics codes. |
| `cw_ind_2_fk_imp.do` | Script that incorporates improvements to the fk_naics-industry correspondence made by Feng Lin. |
| `cw_ind_2_naics_imp.do` | Corresponding improvements to NAICS-industry coorespondence based on the improved fk_naics-industry correspondence. Very underdeveloped and basically not used. |
| `cw_ind_2_sic_imp.do` | Corresponding improvements to SIC-industry coorespondence based on the improved fk_naics-industry correspondence. Very underdeveloped and basically not used. |
| `cw_ind_3_fk_naics12.do` | Script that generates crosswalk between fk\_naics12 and ch\_ind based on data from 2013 and 2014 (1. Map establishments to ch\_ind based on fk\_naics07; 2. Assign fk\_naics12 the ch\_ind (from step 1) that the largest share of the given fk\_naics12 is associated with.). Note that we lose a few ch\_ind by doing this, and this may need some improvement. |
| `cw_ind_3_fk_naics12_imp.do` | Script that generates alternative crosswalks to deal with "disappearing" ch\_ind codes as described above. In particular, we get rid of the ch\_ind07 not among ch\_ind12 by combining it with the ch\_ind12 in which it has most employment. |
| `cw_ind_sect_1_jsung.do` | Script that improves industry-sector crosswalk created by Jihoon Sung. |
| `cw_ind_sect_2_fk_imp.do` | Script that improves industry-sector crosswalk after improvements in the fk_naics-industry correspondence made by Feng Lin. |
| `cw_ind_str.do` | Manually created industry names by Feng Lin. |
| `cw_tradable.sas` | SAS script that exports the NAICS/SIC-tradable crosswalk. Could potentially be improved. |
| ` ` | |

## Archived Script
| `data_1_ind.sas` | SAS script mostly written by Jihoon Sung (extracted from `readlbd3.sas`) that improves on the original NAICS/SIC-industry crosswalk developed by Chang-Tai Hsieh (`naics_sitc_crosswalk2.csv`). Feng Lin further added a few manual fix toward the end. |
| `data_1_ind_actual.sas` | SAS script that finds out NAICS-industry pairs created by `data_1_ind.sas` that are actually utilized (i.e. NAICS codes made use of by fk_naics). SIC-industry pairs are also checked but these are eventually not used. |
| `data_1_ind_sect_fk_imp_emp.do` (Legacy) | |

Additional Note:
* In LBD, each establishment is assigned only one BESTNAICS and BESTSIC.


